package com.lujieni.springboothutool.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.lujieni.springboothutool.utils.CompareUtil;
import lombok.Data;
import java.util.Date;

/**
 * @Author：Jie Ni
 * @Date: 2025/8/19 14:36
 * @Description:
 */
@Data
public class StudentVO {

    // 代表前端传进来的时间就是东9区的时间,idea在debug的时候会将东9区的时间
    // 格式化为服务器所在时区的时间而已
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+9")
    private Date birthday;

    private String name;

    private Integer age;

    public static CompareUtil<StudentVO> getMultiFieldComparator(){
        return new CompareUtil<StudentVO>().thenComparing(StudentVO::getName).thenComparing(StudentVO::getAge).thenComparing(StudentVO::getBirthday);
    }

}
